﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
  <database-object>
    <create>
      IF NOT EXISTS (SELECT name FROM sysindexes WHERE name = 'IX_Topics_Id') CREATE INDEX IX_Topics_Id ON AF_TOPICS (Id) INCLUDE (UpdateId)
    </create>
    <drop>
    </drop>
  </database-object>
  <database-object>
    <create>
      IF NOT EXISTS (SELECT name FROM sysindexes WHERE name = 'IX_Subscriptions') CREATE INDEX IX_Subscriptions ON AF_SUBSCRIPTIONS (Id) INCLUDE (SubscriberId)
    </create>
    <drop>
    </drop>
  </database-object>
  <database-object>
    <create>
      IF NOT EXISTS (SELECT name FROM sysindexes WHERE name = 'IX_Update_PublishedOn') CREATE INDEX IX_Update_PublishedOn ON AF_UPDATE (PublishedOn) INCLUDE (Id)
    </create>
    <drop>
    </drop>
  </database-object>
</hibernate-mapping>